﻿namespace LivePatterns
{
	using System;
	using System.Reflection;
	using System.Reflection.Emit;

	/// <summary>
	/// Contains methods for building objects at runtime.
	/// </summary>
	public static partial class Build
	{
		static Build()
		{
			AssemblyName assemblyName = new AssemblyName();
			assemblyName.Name = "LivePatterns.Runtime";

			// define a new dynamic assembly
			assemblyBuilder = AppDomain.CurrentDomain.DefineDynamicAssembly(assemblyName, AssemblyBuilderAccess.RunAndSave);
            moduleBuilder = assemblyBuilder.DefineDynamicModule("LivePatterns.Runtime", "LivePatterns.Runtime.dll", true);
		}

		private static AssemblyBuilder assemblyBuilder;
		private static ModuleBuilder moduleBuilder;

		private const MethodAttributes _methodAttributes = MethodAttributes.Public | MethodAttributes.Virtual | MethodAttributes.Final | MethodAttributes.HideBySig | MethodAttributes.NewSlot | MethodAttributes.SpecialName;
	}
}
